interface BinNode{
    // return and set element value
    public Object element();
    public Object setElement(Object v);

    //return adn set the left child
    public BinNode left();
    public BinNode setLeft(BinNode p);

    //return and set the right child
    public BinNode right();
    public BinNode setRight(BinNode p);

    //return true if this is a leaf node
    public boolean isLeaf();
}
